﻿@model IList<ProductOverviewModel>
@using Nop.Web.Models.Catalog;
@if (Model.Count > 0)
{
    <div class="block block-recently-viewed-products">
        <div class="title">
            <strong>@T("Products.RecentlyViewedProducts")</strong>
        </div>
        <div class="listbox">
            <ul class="list">
                @for (int i = 0; i < Model.Count; i++)
                {
                    var product = Model[i];
                    <li @(i == Model.Count - 1 ? @Html.Raw(" class=\"last\"") : null)>
                        @if (!String.IsNullOrEmpty(product.DefaultPictureModel.ImageUrl))
                        {
                            <a class="product-picture" href="@Url.RouteUrl("Product", new { SeName = product.SeName })" title="@product.DefaultPictureModel.Title">
                                <img alt="@product.DefaultPictureModel.AlternateText" src="@product.DefaultPictureModel.ImageUrl" title="@product.DefaultPictureModel.Title" />
                            </a>
                        }
                        <a class="product-name" href="@Url.RouteUrl("Product", new { SeName = product.SeName })">@product.Name</a>
                    </li>
                }
            </ul>
        </div>
    </div>
}